﻿using System;
using System.Collections.Generic;

namespace MessagePack.Formatters
{
	// Token: 0x02000014 RID: 20
	public class HashSetFormatter<T> : CollectionFormatterBase<T, HashSet<T>, HashSet<T>.Enumerator, HashSet<T>>
	{
		// Token: 0x06000043 RID: 67 RVA: 0x00002C33 File Offset: 0x00001033
		protected override int? GetCount(HashSet<T> sequence)
		{
			return new int?(sequence.Count);
		}

		// Token: 0x06000044 RID: 68 RVA: 0x00002C40 File Offset: 0x00001040
		protected override void Add(HashSet<T> collection, int index, T value)
		{
			collection.Add(value);
		}

		// Token: 0x06000045 RID: 69 RVA: 0x00002C4A File Offset: 0x0000104A
		protected override HashSet<T> Complete(HashSet<T> intermediateCollection)
		{
			return intermediateCollection;
		}

		// Token: 0x06000046 RID: 70 RVA: 0x00002C4D File Offset: 0x0000104D
		protected override HashSet<T> Create(int count)
		{
			return new HashSet<T>();
		}

		// Token: 0x06000047 RID: 71 RVA: 0x00002C54 File Offset: 0x00001054
		protected override HashSet<T>.Enumerator GetSourceEnumerator(HashSet<T> source)
		{
			return source.GetEnumerator();
		}
	}
}
